home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
009
/
qb3bug.arc
/
PROBLEM1.BAS
next >
Wrap
BASIC Source File
|
1987-07-11
|
2KB
|
48 lines
'+----------------------------------------------------------------------------+
'| Program to demonstrate problems that occur with routines CALLed from |
'| .LIBs or otherwise external to the CALLing QBASIC program. |
'| This will run fine IN the environment, or if compiled to a BRUN file, |
'| it will PROBABLY not run if compiled to a BCOM file from INSIDE the |
'| QB environment, only if compiled from DOS via QB problem1 /o; |
'+----------------------------------------------------------------------------+
CLEAR
DEFINT a-z
fil$="*.BAS"+CHR$(0) ' set up mask for call to asm subr.
' change to suit if no .BAS files are
' in current directory
attr=00 ' attribute to look for (00=normal)
errcd=0 ' routine will set this if there's
' a problem
CALL findfirstf(fil$,attr%,ercd%) ' DOS call to find first matching file
IF ercd THEN PRINT "No Files"
fil$=SPACE$(12) : flen=0 ' set up for a loop to get filenames
' flen returns length of filename and
' -1 when there are no more files
' it never gets this far in BCOM format
ercd=0 ' what the heck, make sure it's 0
CALL findnextf(ercd%)
label:
CALL getnamef(fil$,flen%) ' get next name
PRINT LEFT$(fil$,flen) ' print it
CALL findnextf(ercd%) ' get next matching filename
IF ercd=0 THEN GOTO label ' loop until out of files
BEEP